import Http from "~/apis/utils/http";

export default new (class cms_information_category extends Http {
  getAll() {
    return this.get("informationCategory/all");
  }

  filterData(params?: any) {
    return this.post("informationCategory/filter", params);
  }

  getTreeData(params?: any) {
    return this.get("informationCategory/page/tree", params);
  }

  deleteById(id: any) {
    return this.delete(`informationCategory/delete/${id}`);
  }

  deleteMany(ids: any) {
    return this.post("informationCategory/deleteMany", { ids: ids });
  }

  update(model: any) {
    return this.post("informationCategory/update", model);
  }

  create(model: any) {
    return this.post("informationCategory/create", model);
  }
})();
